Agents are characters in Spaceland. You can direct them to carry out specific orders that are recorded or do immediate commands that you give through the keyboard.

This program allows you to be introduced to the programming commands to assign certain keys to certain actions for your agent.


The file below is an example of the program to create. The agent you choose may or may not have animations to its movements.

In this lesson, we will

  • Create your agent
  • Assign keys to control you agent

Create a Controllable Agent
  1. Select a breed to be your agent.
  2. Setup the Spaceland Environment
    1. Under Factory
    2. Select [Setup and Run Drawer](Color-Dark Red)
    3. Choose [Setup] and drag to Setup Window
    4. Select [Setup and Run Drawer] again.
    5. Choose [Clear All] block and connect it to the [Setup] block in the Setup Window.
  3. Adding your agent to Space Land
    1. Under [My Blocks] (Click the arrow to the right of Factory section).
    2. Select Your Agent (It’s name will be showing that you have chosen).
    3. Select [Create <Agent Name>] and drag to connect it under [Clear Everyone] in the Setup Window.
    4. Set the number of your agent to 1.
      1. If you erase the [Number] block go to Factory (Click the arrow left of My Blocks).
      2. Open the [Number Drawer] (Color-Dark Blue).
      3. Drag a 1block to the [Create <Agent Name>] in the Setup Window.
  4. Controlling Your Agent
    1. Select [Setup and Run Drawer] (Color-Dark Red) in the Factory section.
    2. Choose the [Forever] block and place it in the [Runtime Window].
    3. Open the [Logic drawer ](Color-Orange) and drag out 4 [If Test Then] blocks.
    4. Connect them one under the other to the [Forever]Block.
  5. You will be setting up controls so that If a button is pressed, Then an action by the agent will be done.
    1. Choose the [Controls Drawer](Color-Yellow).
    2. Drag a [Keyboard A?] and connect to each Test part of the [If Test Then] blocks.
    3. To the right of each [Keyboard A?] block is a downward triangle that appears when the mouse is on it.
    4. Select the correct keyboard button for each Keyboard:
      1. Up Arrow
      2. Down Arrow
      3. Left Arrow
      4. Right Arrow
  6. Moving the Agent
    1. Choose the Movement Drawer (Color-Red).
    2. Select [Forward Steps] and place it under the [If Test Then] block for Up Arrow.
    3. Select [Back Steps] and place it under the [If Test Then] block for Down Arrow.
    4. Select [Left Degrees] and place it under the [If Test Then] block for Left Arrow.
    5. Change the degree number from 90 to 5.
    6. Select [Right Degrees] and place it under the [If Test Then]block for Right Arrow.
    7. Change the degree number from 90 to 5.
  7. Go to the Space Land window and select the [Runtime tab] to see the [Setup] button and [Forever button].
    1. Push the [Setup Button] to create you agent on a blank field.
    2. Push the [Forever Button] so the controls (arrows buttons) will work.
    3. See if you agent is controlled by you.
    4. Use different views [(Aerial, Agent Eye, and Agent View)] to observe your agent.
  8. Extra
  9. If the Agent works and time is available,
  10. Edit the terrain to see how the agent acts on it. (Make mountains, blocks, holes, and color them to see more clearly.
  11. Observe the way your agent interacts now on the terrain.